//
//  MBGeneralManager.m
//  GC_OC
//
//  Created by Kris on 2023/5/24.
//

#import "MBGeneralManager.h"
#import <Security/Security.h>
#import <CommonCrypto/CommonDigest.h>
#import <CommonCrypto/CommonCryptor.h>
#import "RSA.h"

@implementation MBGeneralManager
+ (instancetype)manager {
    
    static MBGeneralManager * player;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        player = [[MBGeneralManager alloc]init];
    });
    return player;
}

- (void)setPublicKey:(NSString *)publicKey
{
    _publicKey = publicKey;
}

- (NSString *)getDecryptedStringWithEncryptedString:(NSString *)encryptedString
{
    NSString *decryptedString = [RSA decryptString:encryptedString publicKey:self.publicKey];
    
    return decryptedString;
}




@end
